<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@include file="/pages/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
	<title>广东工业大学招生办</title>
	<link rel="stylesheet" type="text/css" href="${ctx }/css/login.css" />
	<link rel="stylesheet" type="text/css" href="${ctx }/css/reset.css" />
	<link rel="stylesheet" type="text/css" href="${ctx }/css/common.css" />
	<link rel="stylesheet" type="text/css" href="${ctx }/css/system.css" />
	<script type="text/javascript" src="${ctx }/js/jquery.min.js"></script>
	<script type="text/javascript" src="${ctx }/js/jquery-1.5.1.js"></script>
	<script type="text/javascript" src="${ctx }/js/action.js"></script>
	
    <script type="text/javascript">
	$(document).ready(function(){
	   $("#examineeNo").focus(function(){
	     $(".validateTips").html("");
	     if($(this).val()=="考生号"){
	     	 $(this).val("");
	     }
	   });
    	$("#examineeNo").blur(function(){
	     if($(this).val()==""){
	     	 $(this).val("考生号");
	     }
	    });
	    $("#userIdentify").focus(function(){
	     $(".validateTips").html("");
	     if($(this).val()=="身份证号"){
	     	 $(this).val("");
	     }
	   });
    	$("#userIdentify").blur(function(){
	     if($(this).val()==""){
	     	 $(this).val("身份证号");
	     }
	    });
	    $("#Mobile").focus(function(){
	     $(".validateTips").html("");
	     if($(this).val()=="手机号"){
	     	 $(this).val("");
	     }
	   });
    	$("#Mobile").blur(function(){
	     if($(this).val()==""){
	     	 $(this).val("手机号");
	     }
	    });
	    $("#Password").focus(function(){
	     $(".validateTips").html("");
	     if($(this).val()==""){
	     	$(this).siblings("label").hide();
      	 }
	   });
    	$("#Password").blur(function(){
	     if($(this).val()==""){
	     	$(this).siblings("label").show();
	     }
	    });
  	})
	
	function checkPersonalLogin(){
		var examieeNo = $("#examineeNo").val().replace("考生号","");
		var IdNum = $("#userIdentify").val().replace("身份证号","");
		if(examieeNo.length == 0){
			$(".validateTips").html("请输入考号");
		}
		else if(IdNum =="" || IdNum.length < 18) {
			$(".validateTips").html("请输入18位身份证号码");
		}else{
			$(".validateTips").html("");
			$("#personalLogin").submit();
		}
	}
	
	function checkGroupLogin(){
		var MobileNo = $("#Mobile").val().replace("手机号","");
		var Pwd = $("#Password").val();
		if(MobileNo.length == 0){
			$(".validateTips").html("请输入手机号");
		}else if (Pwd.length == 0){
			$(".validateTips").html("请输入密码");
		}else{
			$(".validateTips").html("");
			$("#groupLogin").submit();
		}
	}
	
	function reg(){
		window.location.href="${ctx}/base/group-register!register.action";
	}
	
</script>

  </head>

<body>
<s:if test="hasActionMessages()">      
         <s:iterator value="actionMessages">      
             <script language="JavaScript">      
                 alert("<s:property escape="false"/>");     
             </script>      
         </s:iterator>      
      </s:if>
<div class="container">
  <div class="page">
    <div class="header"></div>
    <div class="main">
      <div class="login_frame">
        <div class="login_title">
          <h4>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;登录</h4>
        </div>


       <div class="login_main"> 
        <!--切换的tab--> 
        <div class="boxNav" id="boxNav">
         <ul>
          <li id="boxNav1" class="hovertab" onclick="clickNav(1)">考生单独登录&nbsp;&nbsp;&nbsp; </li>
          <li id="boxNav2" class="normaltab" onclick="clickNav(2)">集体缴费登录&nbsp;&nbsp;&nbsp; </li>
          <li id="blue_line"> </li>
        </ul>
       </div>
       <div class="validateTips tc pt20"></div>
       <!--单独登录--> 
       <div class="see" id="boxContent1"> 
       	<form id="personalLogin" action="examinee-pay!checkLogin.action" method="post">
            <div class="stu_name"><input type="text" id="examineeNo" name="examineeNo" value="考生号" maxlength="25"/></div>
            <div class="stu_id"><input type="text" id="userIdentify" name="userIdentify" value="身份证号" maxlength="18"/></div>
            <div class="stu_verify"><input type="text" /></div>
            <input type="button" onclick="checkPersonalLogin()" class="login_but"/>
        </form>
       </div>
       
       <!--集体登录--> 
       <div class="nosee" id="boxContent2">  
          <form id="groupLogin" action="group-register!checkLogin.action" method="post">
            <div class="stu_phone"><input type="text" name="Mobile" id="Mobile" value="手机号" maxlength="11"/></div>
            <div class="stu_key"><input type="password" name="Password" id="Password" maxlength="20"/><label for="Password" style="position: relative; top:-25px; left:45px;">密码</label></div>
            <div class="stu_verify"><input type="text" /></div>
            <input type="button" onclick="return checkGroupLogin()" class="login_but"/>
            <input type="button" class="reg_but" onclick="reg()"/>
            <div class="tips">*如无集体帐号的用户，请点击注册</div>
          </form>
       </div>

      </div>
      </div>
    </div>
  </div>
</div>
</body>
</html>
